package com.bbzn.device.client.dao.group;

import com.bbzn.device.client.dataobject.GroupLink;
import com.bbzn.device.client.dto.group.GroupLinkDTO;
import com.bbzn.device.client.dto.group.LinkGroupDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GroupLinkMapper {
    /**
     * delete by primary key
     *
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Long id);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(GroupLink record);

    int insertOrUpdate(GroupLink record);

    int insertOrUpdateSelective(GroupLink record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(GroupLink record);

    /**
     * select by primary key
     *
     * @param id primary key
     * @return object by primary key
     */
    GroupLink selectByPrimaryKey(Long id);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(GroupLink record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(GroupLink record);

    List<GroupLink> findByAll(GroupLink groupLink);

    int updateBatch(List<GroupLink> list);

    int updateBatchSelective(List<GroupLink> list);

    int batchInsert(@Param("list") List<GroupLink> list);

    List<GroupLink> queryByAll(GroupLinkDTO group);

    int batchDel(@Param("ids") List<Long> list);

    List<LinkGroupDTO> getLinkGroup(@Param("ids") List<Long> ids, @Param("groupId") Long groupId) throws Exception;
}